{% extends 'layout.html' %}


{% block content %}
    <div class="container">

        {#        <div class="panel panel-default">#}
        {#            <div class="panel-heading" style="font-weight: 700">#}
        {#                <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>#}
        {#                批量上传#}
        {#            </div>#}
        {#            <div class="panel-body">#}
        {#                <form method="post" enctype="multipart/form-data" action="/depart/multi/">#}
        {#                    {% csrf_token %}#}
        {#                    <input type="file" name="exc">#}
        {#                    <input type="submit" value="上传" class="btn btn-danger btn-xs" style="margin-top: 10px">#}
        {#                </form>#}
        {#            </div>#}
        {#        </div>#}

        <div style="margin-bottom: 20px">
            <a class="btn btn-success" href="/city/add/">
                <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
                新建城市
            </a>
        </div>
        <div class="panel panel-default">


            <div class="panel-heading" style="font-weight: 700">
                <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                城市列表
            </div>

            <!-- Table -->
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>logo</th>
                    <th>城市名称</th>
                    <th>人口/人</th>
                </tr>
                </thead>
                <tbody>
                {% for item in queryset %}
                    <tr>
                        <th>{{ item.id }}</th>
                        <td>
                            <img src="/media/{{ item.img }}" style="width: 30px; height: 30px">
                        </td>
                        <td>{{ item.name }}</td>
                        <td>{{ item.count }}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
        <ul class="pagination">
            {{ page_string }}
        </ul>
    </div>
{% endblock %}

